-- local Dominos = LibStub:GetLibrary("Dominos")

local options = { 
	name = "Dominos",
	handler = Dominos,
    type = 'group',
    args = {
    	reset = {
			type = "execute",
			name = "reset",
			desc = "Debug: reset the icon table",
			func = "ResetIconTable",
		},
		test = {
			type = "execute",
			name = "test",
			desc = "test func",
			func = "Test",
		},
		target = {
			type = "group",
			name = "Target Frame Options",
			desc = "Target Frame Options",
			args = {
				size = {
					type = "range",
					name = "size",
					desc = "Sets the size of the Target Frame",
					min = 5,
					max = 100,
					step = 1,
					get = "GetTargetFrameSize",
					set = "SetTargetFrameSize",
				},
			},
		},
		que = {
			type = "group",
			name = "Que Frame Options",
			desc = "Que Frame Options",
			args = {
				size = {
					type = "range",
					name = "size",
					desc = "Sets the size of the Que Frames",
					min = 5,
					max = 100,
					step = 1,
					get = "GetQueFrameSize",
					set = "SetQueFrameSize",
				},
			},
		},
		--[[
		direction = {
			type = "input",
			name = "Direction",
			desc = "The direction for the icons to grow in",
			get = "GetAnchorDirection",
			set = "SetAnchorDirection",
			-- validate = {"Up", "Down", "Left", "Right"},
		},
		]]
		direction = {
			type = "select",
			name = "Grow Direction",
			desc = "Specify the direction the frames should grow in",
			values = {Up = "Up", Down = "Down", Left = "Left", Right = "Right"},
			get = "GetAnchorDirection",
			set = "SetAnchorDirection",
		},
		spacing = {
			type = "range",
			name = "spacing",
			desc = "Space between icon frames",
			min = 0,
			max = 100,
			step = 1,
			get = "GetFrameSpacing",
			set = "SetFrameSpacing",
		},
		locked = {
			type = "toggle",
			name = "Locked",
			desc = "Sets if the target frames are movable or not",
			get = "GetLocked",
			set = "SetLocked",
		},
		BGOptions = {
			type = "group",
			name = "BG Options",
			desc = "Options for the Icon Backgrounds",
			args = {
				showOnActive = {
					type = "toggle",
					name = "Show On Active",
					desc = "Show a background on Acitve Icons",
					get = "GetShowBackgroundOnActive",
					set = "SetShowBackgroundOnActive",
				},
				showOnInactive = {
					type = "toggle",
					name = "Show On Inactive",
					desc = "Show a background on Inacitve Icons",
					get = "GetShowBackgroundOnInactive",
					set = "SetShowBackgroundOnInactive",
				},
				ActiveColor = {
					type = "color",
					name = "Active Color",
					desc = "Set the color of active backgrounds",
					hasAlpha = true,
					get = "GetActiveColor",
					set = "SetActiveColor",
				},
				InactiveColor = {
					type = "color",
					name = "Inctive Color",
					desc = "Set the color of Inactive backgrounds",
					hasAlpha = true,
					get = "GetInactiveColor",
					set = "SetInactiveColor",
				},
			},
		},
		
		BorderOptions = {
			type = "group",
			name = "Border Options",
			desc = "Options for the Icon Borders",
			args = {

			},
		},
	},
}


LibStub("AceConfig-3.0"):RegisterOptionsTable("Dominos", options)